home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / GUICtrlGetState.au3 < prev    next >
Text File  |  2006-06-17  |  447b  |  17 lines

  1. #include <GUIConstants.au3>
  2.  
  3. GUICreate ("My GUI (GetControlState)")
  4. $n=GUICtrlCreateCheckbox ("checkbox",10,10)
  5. GUICtrlSetState (-1,1)            ; checked 
  6.  
  7. GUISetState ()       ; will display an empty dialog box
  8.  
  9. ; Run the GUI until the dialog is closed
  10. While 1
  11.     $msg = GUIGetMsg()
  12.     
  13.     If $msg = $GUI_EVENT_CLOSE Then ExitLoop
  14. Wend
  15.  
  16. msgbox (0,"state",StringFormat("GUICtrlRead=%d\nGUICtrlGetState=%d",GUICtrlRead($n),GUICtrlGetState($n)))
  17.